public class Test3 {
    public static void main(String[] args) {

        int sum = 0;
        for (int i = 0; i < 20; i++) {
            sum += (int) (1 + Math.random() * (6));
        }
        System.out.println(sum);

        sum = 0;
        for (int i = 0; i < 20; i++) {
            int p = (int) (1 + Math.random() * (6));
            if (p == 6) {
                sum += p;
                break;
            }

        }
        System.out.println(sum);


        for (int i = 0; i < 20; i++) {
            int p = (int) (1 + Math.random() * (6));
            if (p == 4)
                continue;
            sum += p;

        }
        System.out.println(sum);
    }
}
